class RegisterInfo {
  constructor(trainType) {
    // 报考类型
    this.trainType = trainType;

    this.feeCone = `<tr>
    <td>
    <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="" />
    </td>
    <td>
    <input class="fee-money form_input text_ient" type="number" value="" />
    </td>
    <td>
    <input class="fee-time form_input text_ient" type="date" value="" />
    </td>
    <td>
    <select class="fee-flag form-control">
    <option value="0">否</option>
    <option value="1">是</option>
    </select>
    </td>
    </tr>`;
  }

  // 获取学历层次
  getEducationName(education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryEducationList',
        async: false,
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: (data) => {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          // 未赋值的select
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            if (education.educationName === data[i].educationName) {
              id = data[i].id;
            }
            initHtml += `<option value=${data[i].id}>${data[i].educationName}</option>`;
            html_ += `<option value=${data[i].id} ${
              education.educationName === data[i].educationName
                ? 'selected'
                : ''
            }>${data[i].educationName}</option>`;
          }
          reject({ html_, initHtml, id });
        },
      });
    });
  }

  // 获取学习形式
  getStudyMode(education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryModeList',
        async: false,
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: (data) => {
          var html_ = '<option value="0">请选择</option>';
          // 未赋值的
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            initHtml += `<option value=${data[i].id}>${data[i].mode}</option>`;
            html_ += `<option value=${data[i].id} ${
              education.studyMode === data[i].mode ? 'selected' : ''
            }>${data[i].mode}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 获取学校
  getSchool(parentId, education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/querySchoolList',
        method: 'Post',
        data: 'educationId=' + parentId,
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: (data) => {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            if (education.schoolName === data[i].schoolName) {
              id = data[i].id;
            }
            initHtml += `<option value=${data[i].id}>${data[i].schoolName}</option>`;

            html_ += `<option value=${data[i].id} ${
              education.schoolName === data[i].schoolName ? 'selected' : ''
            }>${data[i].schoolName}</option>`;
          }
          reject({ html_, id, initHtml });
        },
      });
    });
  }

  // 获取报考专业
  getCourse(parentId, education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryCourseList',
        method: 'Post',
        data: 'schoolId=' + parentId,
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            initHtml += `<option value=${data[i].id}>${data[i].courseName}</option>`;

            html_ += `<option value=${data[i].id} ${
              education.majorName === data[i].courseName ? 'selected' : ''
            }>${data[i].courseName}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 获取学历批次
  getXLBatch(parentId, education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryBatchList',
        method: 'Post',
        data: {
          pid: parentId,
          trainType: 'education',
        },
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            html_ += `<option value=${data[i].id} ${
              education.batch === data[i].batch ? 'selected' : ''
            }>${data[i].batch}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 设置学历报考信息的值
  async getEducationSelect(data) {
    try {
      var studyMode = await this.getStudyMode(data);
      var educationName = await this.getEducationName(data);
      var school = await this.getSchool(educationName.id, data);
      var course = await this.getCourse(school.id, data);
      // 批次
      var batch = await this.getXLBatch(studyMode.id, data);
    } catch (error) {}
    return {
      educationName,
      studyMode,
      school,
      course,
      batch,
    };
  }

  // 修改学历报考
  async initEditEducations(data, fee) {
    var idx = 0;

    var { educationName, studyMode, school, course, batch } =
      await this.getEducationSelect(data);

    window.educationSelect = educationName.initHtml;
    window.studyModeSelect = studyMode.initHtml;
    window.schoolSelect = school.initHtml;
    window.courseSelect = course.initHtml;
    window.batchSelect = batch.initHtml;

    var infoDom = `<div class="p_line ptb10 text_ient lx-row student-education">
      <a class="find_a">学习形式：</a>
      <select class="studyMode select-25 form-control" onchange="queryXLBatch(this)" style="width:180px;">
      ${studyMode.html_}
      </select>
      <a class="find_a">学历层次：</a>
      <select style="width:180px;" class="educationName select-25 form-control" onchange="querySchool(this)">
      ${educationName.html_}
      </select>
      <a class="find_a">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;校：</a>
      <select class="select-25 form-control myschool"  style="width:180px;" onchange="queryCourse(this)">
          ${school.html_}
      </select>
      <a class="find_a">报考专业：</a>
      <select class="select-25 form-control mycourse" style="width:180px;" onchange="showFee(this, '.fee-${idx}')">
          ${course.html_}
      </select>
	  <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
      <select class="select-25 form-control mybatch" style="width:180px;">
           ${batch.html_}
      </select>
    </div>`;

    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;
      return `<tr>
        <td>
        <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
          item.stage
        }" />
        </td>
        <td>
        <input class="fee-money form_input text_ient" type="number" value="${
          item.amount
        }" />
        </td>
        <td>
        <input class="fee-time form_input text_ient" type="date" value="${
          item.term
        }" />
        </td>
        <td>
        <select class="fee-flag form-control" value="${item.flag}">
        <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
        <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
        </select>
        </td>
        </tr>`;
    });

    const index = fee.length;

    if (index < 4) {
      trDom.length = 4;
      trDom.fill(this.feeCone, index);
    }

    var feeDom = `<div class="lx-section fee fee-${idx}">
      <div class="title">
      学历缴费信息
      </div>
      <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
      <table class="layui-table content-table" style="width: 100%">
      <thead>
      <tr>
      <th>期数</th>
      <th>缴费金额</th>
      <th>缴费日期</th>
      <th>是否已缴费</th>
      </tr>
      </thead>
      <tbody>
      ${trDom.join('')}
      </tbody>
      </table>
      
      <div class="p_line text_ient lx-row ptb10" style="width: 90%;margin: 0 auto;">
      <div class="col lx-col-33">
      <a class="find_a"><span style="color:red">*</span>总费用：</a>
      <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
      </div>
      <div class="col lx-col-33">
      <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
      <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
      </div>
      <div class="col lx-col-33">
      <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
      <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
      </div>
      </div>
      </div>
      </div>`;
    return {
      infoDom,
      feeDom,
    };
  }

  // 获取职业技能类别
  getOccupation(ocuData) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryOccupationList',
        async: false,
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            initHtml += `<option  value=${data[i].id} ${
              isSelected ? 'selected' : ''
            }>${data[i].occupationName}</option>`;
            if (ocuData.professionalTypes === data[i].occupationName) {
              id = data[i].id;
              isSelected = true;
            }
            html_ += `<option  value=${data[i].id} ${
              isSelected ? 'selected' : ''
            }>${data[i].occupationName}</option>`;
          }
          reject({ html_, initHtml, id });
        },
      });
    });
  }

  // 获取职业的报考专业
  getOccupationCourse(id, ocuData) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryOccupationInfoList',
        async: false,
        method: 'Post',
        data: 'occupationId=' + id,
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            initHtml += `<option  value=${data[i].occupationId} ${
              isSelected ? 'selected' : ''
            }>${data[i].occupationInfoName}</option>`;
            if (ocuData.majorName === data[i].occupationInfoName) {
              id = data[i].occupationId;
              isSelected = true;
            }
            html_ += `<option  value=${data[i].occupationId} ${
              isSelected ? 'selected' : ''
            }>${data[i].occupationInfoName}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 获取职业批次
  getZYBatch(education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryBatchList',
        method: 'Post',
        data: {
          trainType: 'occupation',
        },
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            html_ += `<option value=${data[i].id} ${
              education.batch === data[i].batch ? 'selected' : ''
            }>${data[i].batch}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 获取职业的所有值
  async getOccupationSelect(data) {
    var occupation = await this.getOccupation(data);
    var occupationCourse = await this.getOccupationCourse(occupation.id, data);
    var batch = await this.getZYBatch(data);
    return {
      occupation,
      occupationCourse,
      batch,
    };
  }

  // 修改职业报考
  async initEditOccupations(data, fee) {
    var idx = 0;

    var { occupation, batch, occupationCourse } =
      await this.getOccupationSelect(data);
    window.occupation = occupation.initHtml;
    window.occupationCourse = occupationCourse.initHtml;
    window.batch = batch.initHtml;

    var infoDom = `<div class="p_line text_ient lx-row ptb10 student-occupation">
    <a class="find_a">职业技能类别：</a>
    <select class="select-25 form-control myeducation professional-type"  style="width:25%; max-width: 180px;" onchange="queryOccupation(this, ${idx})">
      ${occupation.html_}
    </select>
    <a class="find_a">报考专业：</a>
    <select id="myOccupationCourse${idx}" style="width:25%; max-width: 180px;" class="select-25 form-control majorName" onchange="showFee(this, '.zhiye-${idx}')">
        ${occupationCourse.html_}
    </select>
    <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
    <select style="width:25%; max-width: 180px;" class="select-25 form-control mybatch">
        ${batch.html_}
    </select>
    <a class="find_a">报考说明：</a>
    <input type="text" style="width:25%; max-width: 180px;" value="${data.applyExplain}" class="form_input text_ient applyExplain" placeholder="请输入报考说明" />
  </div>`;
    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;
      return `<tr>
      <td>
      <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
        item.stage
      }" />
      </td>
      <td>
      <input class="fee-money form_input text_ient" type="number" value="${
        item.amount
      }" />
      </td>
      <td>
      <input class="fee-time form_input text_ient" type="date" value="${
        item.term
      }" />
      </td>
      <td>
      <select class="fee-flag form-control" value="${item.flag}">
      <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
      <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
      </select>
      </td>
      </tr>`;
    });

    const index = fee.length;

    if (index < 2) {
      trDom.length = 2;
      trDom.fill(this.feeCone, index);
    }

    var feeDom = `<div class="lx-section fee fee-${idx}">
    <div class="title">
    职业缴费信息
    </div>
    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
    <table class="layui-table content-table" style="width: 100%">
    <thead>
    <tr>
    <th>期数</th>
    <th>缴费金额</th>
    <th>缴费日期</th>
    <th>是否已缴费</th>
    </tr>
    </thead>
    <tbody>
    ${trDom.join('')}
    </tbody>
    </table>
    
    <div class="p_line text_ient lx-row ptb10" style="width: 90%;margin: 0 auto;">
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>总费用：</a>
    <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
    </div>
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
    <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
    </div>
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
    <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
    </div>
    </div>
    </div>
    </div>`;
    return {
      infoDom,
      feeDom,
    };
  }

  // 获取职称等级
  getTitle(title) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryTitleList',
        async: false,
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            initHtml += `<option  value=${data[i].id}>${data[i].titleName}</option>`;
            if (title.professionalLevel === data[i].titleName) {
              id = data[i].id;
              isSelected = true;
            }
            html_ += `<option  value=${data[i].id} ${
              isSelected ? 'selected' : ''
            }>${data[i].titleName}</option>`;
          }
          reject({ html_, id, initHtml });
        },
      });
    });
  }

  // 获取职称系列
  getTitleSeries(education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education//queryProfessionalSeriesList',
        async: false,
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: (data) => {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          // 未赋值的select
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            if (education.professionalSeries === data[i].professionalSeries) {
              id = data[i].id;
              isSelected = true;
            }
            initHtml += `<option value=${data[i].id}>${data[i].professionalSeries}</option>`;
            html_ += `<option value=${data[i].id} ${
              isSelected ? 'selected' : ''
            }>${data[i].professionalSeries}</option>`;
          }
          reject({ html_, initHtml, id });
        },
      });
    });
  }

  // 获取职称的报考专业
  getTitleCourse(id, ocuData) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryOccupationInfoList',
        async: false,
        method: 'Post',
        data: 'occupationId=' + id,
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            initHtml += `<option  value=${data[i].occupationId} ${
              isSelected ? 'selected' : ''
            }>${data[i].occupationInfoName}</option>`;
            if (ocuData.majorName === data[i].occupationInfoName) {
              id = data[i].occupationId;
              isSelected = true;
            }
            html_ += `<option  value=${data[i].occupationId} ${
              isSelected ? 'selected' : ''
            }>${data[i].occupationInfoName}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 获取职称批次
  getZCBatch(education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryBatchList',
        method: 'Post',
        data: {
          trainType: 'title',
        },
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            html_ += `<option value=${data[i].id} ${
              education.batch === data[i].batch ? 'selected' : ''
            }>${data[i].batch}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 设置职称的所有值
  async getTitleSelect(data) {
    var title = await this.getTitle(data);
    var education = await this.getTitleSeries(data);
    var course = await this.getTitleCourse(education.id, data);
    var batch = await this.getZCBatch(data);

    return {
      title,
      education,
      course,
      batch,
    };
  }

  // 修改职称
  async initEditTitles(data, fee) {
    var idx = 0;

    var { title, education, course, batch } = await this.getTitleSelect(data);
    window.title = title.initHtml;
    window.education = education.initHtml;
    window.batch = batch.initHtml;

    var infoDom = `<div class="p_line text_ient lx-row ptb10 student-title">
    <a class="find_a">职称等级：</a>
    <select class="select-25 form-control job-title professional-level" style="width:25%; max-width: 180px;">
    ${title.html_}
    </select>
    <a class="find_a">职称系列：</a>
    <select class="select-25 form-control professional-series" style="width:25%; max-width: 180px;"  onchange="queryOccupation(this, 0)">
        ${education.html_}
    </select>
    <a class="find_a">报考专业：</a>
    <select id="majorName${idx}" class="select-25 form-control mycourse majorName"  style="width:25%; max-width: 180px;" onchange="showFee(this, 'zhicheng-${idx}')">
        ${course.html_}
    </select>
    <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
    <select class="select-25 form-control mybatch"  style="width:25%; max-width: 180px;" >
    ${batch.html_}
    </select>
  </div>`;

    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;
      return `<tr>
      <td>
      <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
        item.stage
      }" />
      </td>
      <td>
      <input class="fee-money form_input text_ient" type="number" value="${
        item.amount
      }" />
      </td>
      <td>
      <input class="fee-time form_input text_ient" type="date" value="${
        item.term
      }" />
      </td>
      <td>
      <select class="fee-flag form-control" value="${item.flag}">
      <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
      <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
      </select>
      </td>
      </tr>`;
    });

    const index = fee.length;

    if (index < 2) {
      trDom.length = 2;
      trDom.fill(this.feeCone, index);
    }

    var feeDom = `<div class="lx-section fee fee-${idx}">
    <div class="title">
    职称缴费信息
    </div>
    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
    <table class="layui-table content-table" style="width: 100%">
    <thead>
    <tr>
    <th>期数</th>
    <th>缴费金额</th>
    <th>缴费日期</th>
    <th>是否已缴费</th>
    </tr>
    </thead>
    <tbody>
    ${trDom.join('')}
    </tbody>
    </table>
    
    <div class="p_line text_ient lx-row ptb10" style="width: 90%;margin: 0 auto;">
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>总费用：</a>
    <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
    </div>
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
    <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
    </div>
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
    <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
    </div>
    </div>
    </div>
    </div>`;
    return {
      infoDom,
      feeDom,
    };
  }

  // 获取报考项目
  async getTrain(train) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryTrainList',
        async: false,
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var id = '';
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            initHtml += `<option  value=${data[i].id}>${data[i].trainName}</option>`;
            if (train.applyProject === data[i].trainName) {
              id = data[i].id;
              isSelected = true;
            }
            html_ += `<option  value=${data[i].id} ${
              isSelected ? 'selected' : ''
            }>${data[i].trainName}</option>`;
          }
          reject({ html_, id, initHtml });
        },
      });
    });
  }

  // 获取考试科目
  getTrainInfo(id, train) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryTrainInfoList',
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        data: 'trainId=' + id,
        success: function (data) {
          var id = '';
          var initHtml = '<option value="0">请选择</option>';
          var html_ = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            if (train.examCourse.split(',').includes(data[i].trainInfoName)) {
              isSelected = true;
            }
            html_ += `<option value=${data[i].id} ${
              isSelected ? 'selected' : ''
            }>${data[i].trainInfoName}</option>`;
          }
          reject({ html_, id, initHtml });
        },
      });
    });
  }

  // 获取班次
  getClasss(id, train) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryClasssList',
        method: 'Post',
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        data: 'trainId=' + id,
        success: function (data) {
          var id = '';
          var initHtml = '<option value="0">请选择</option>';
          var html_ = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            var isSelected = false;
            initHtml += `<option value=${data[i].id}  >${data[i].classs}</option>`;
            if (train.classs === data[i].classs) {
              isSelected = true;
              id = data[i].id;
            }
            html_ += `<option value=${data[i].id} ${
              isSelected ? 'selected' : ''
            } >${data[i].classs}</option>`;
          }
          reject({ html_, id, initHtml });
        },
      });
    });
  }

  // 获取培训批次
  getPXBatch(education) {
    return new Promise((reject, resolve) => {
      $.ajax({
        url: baseUrl + 'education/queryBatchList',
        method: 'Post',
        data: {
          trainType: 'train',
        },
        headers: {
          Authorization: JSON.parse(localStorage.getItem('userInfo')).token,
        },
        success: function (data) {
          var html_ = '<option value="0">请选择</option>';
          var initHtml = '<option value="0">请选择</option>';
          for (var i = 0; i < data.length; i++) {
            html_ += `<option value=${data[i].id} ${
              education.batch === data[i].batch ? 'selected' : ''
            }>${data[i].batch}</option>`;
          }
          reject({ html_, initHtml });
        },
      });
    });
  }

  // 设置培训所有值
  async getTrainSelect(data) {
    var train = await this.getTrain(data);
    console.log('train', train);
    var trainInfo = await this.getTrainInfo(train.id, data);
    var classs = await this.getClasss(trainInfo.id, data);
    var batch = await this.getPXBatch(data);

    return {
      train,
      trainInfo,
      classs,
      batch,
    };
  }

  // 修改培训
  async initEditTrains(data, fee) {
    var idx = 0;

    var { train, trainInfo, classs, batch } = await this.getTrainSelect(data);

    window.train = train.initHtml;
    window.trainInfo = trainInfo.initHtml;
    window.classs = classs.initHtml;
    window.batch = batch.initHtml;

    var infoDom = `<div class="p_line text_ient lx-row student-train">
    <a class="find_a">报考项目：</a>
    <select class="select-25 form-control myTrain apply-project" style="width:25%; max-width: 180px;" onchange="queryTrain(this, ${idx})">
    ${train.html_}
    </select>
    <a class="find_a">考试科目：</a>
    <label for="examCourse${idx}"></label>
    <select id="examCourse${idx}" style="width:25%; max-width: 180px;" title="请选择" multiple data-width="auto" data-live-search="true" data-size="5" class="selectpicker bla bla bli select-25 form-control exam-course" >
      ${trainInfo.html_}
    </select>
    <a class="find_a">班&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
    <select class="select-25 form-control classes" style="width:25%; max-width: 180px;">
        ${classs.html_}
    </select>
    <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
    <select class="select-25 form-control mybatch" style="width:25%; max-width: 180px;" style="width: 20%; max-width: 150px;">
    ${batch.html_}
    </select>
  </div>
  <div class="p_line text_ient lx-row ptb10">
    <a class="find_a">报考类型：</a>
    <select class="select-30 form-control apply-assist" style="width:25%; max-width: 180px;">
        <option value="0" ${
          data.applyAssist === '报考' ? 'selected' : ''
        }>报考</option>
        <option value="1" ${
          data.applyAssist === '培训' ? 'selected' : ''
        }>培训</option>
        <option value="2" ${
          data.applyAssist === '培训加报考' ? 'selected' : ''
        }>培训加报考</option>
    </select>
    <a class="find_a">&nbsp;开始时间：</a>
    <input id="start${idx}" type="date" class="form_input text_ient start" value=${
      data.startDate
    } style="width:25%; max-width: 180px;" placeholder="请选择开始时间" />
    <a class="find_a">&nbsp;&nbsp;结束时间：</a>
    <input id="end${idx}" type="date" class="form_input text_ient end" value=${
      data.endDate
    } style="width:25%; max-width: 180px;" placeholder="请选择结束时间" />
  </div>`;

    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;
      return `<tr>
      <td>
      <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
        item.stage
      }" />
      </td>
      <td>
      <input class="fee-money form_input text_ient" type="number" value="${
        item.amount
      }" />
      </td>
      <td>
      <input class="fee-time form_input text_ient" type="date" value="${
        item.term
      }" />
      </td>
      <td>
      <select class="fee-flag form-control" value="${item.flag}">
      <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
      <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
      </select>
      </td>
      </tr>`;
    });

    const index = fee.length;

    if (index < 2) {
      trDom.length = 2;
      trDom.fill(this.feeCone, index);
    }

    var feeDom = `<div class="lx-section fee fee-${idx}">
    <div class="title">
    培训缴费信息
    </div>
    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
    <table class="layui-table content-table" style="width: 100%">
    <thead>
    <tr>
    <th>期数</th>
    <th>缴费金额</th>
    <th>缴费日期</th>
    <th>是否已缴费</th>
    </tr>
    </thead>
    <tbody>
    ${trDom.join('')}
    </tbody>
    </table>
    
    <div class="p_line text_ient lx-row ptb10" style="width: 90%;margin: 0 auto;">
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>总费用：</a>
    <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
    </div>
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
    <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
    </div>
    <div class="col lx-col-33">
    <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
    <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
    </div>
    </div>
    </div>
    </div>`;
    return {
      infoDom,
      feeDom,
    };
  }

  // 查看学历报考
  initLookEducations(item, fee) {
    var infoDom = `<div class="p_line text_ient lx-row ptb10 student-education">
      <a class="find_a">学习形式：</a>
      <input type="text" class="form_input text_ient" style="width:180px;" value="${item.studyMode}" />
      <a class="find_a">学历层次：</a>
      <input type="text" class="form_input text_ient" style="width:180px;" value="${item.educationName}" />
      <a class="find_a">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;校：</a>
      <input type="text" class="form_input text_ient" style="width:180px;" value="${item.schoolName}" />
      <a class="find_a">报考专业：</a>
      <input type="text" class="form_input text_ient" style="width:180px;" value="${item.majorName}" />
      <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
      <input type="text" class="form_input text_ient" value="${item.batch}" />
    </div>`;

    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;

      return `<tr>
        <td>
        <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
          item.stage
        }" />
        </td>
        <td>
        <input class="fee-money form_input text_ient" type="number" value="${
          item.amount
        }" />
        </td>
        <td>
        <input class="fee-time form_input text_ient" type="date" value="${
          item.term
        }" />
        </td>
        <td>
        <select class="fee-flag form-control">
        <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
        <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
        </select>
        </td>
        </tr>`;
    });

    var feeDom = `<div class="lx-section fee">
        <div class="title">
        学历缴费信息
        </div>
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
        <table class="layui-table content-table" style="width: 100%">
        <thead>
        <tr>
        <th>期数</th>
        <th>缴费金额</th>
        <th>缴费日期</th>
        <th>是否已缴费</th>
        </tr>
        </thead>
        <tbody>
        ${trDom.join('')}
        </tbody>
        </table>
        
        <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;">
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>总费用：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">报名费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">培训费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
        <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
        <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
        </div>
        <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;"></div>
        <div class="col lx-col-50 caption">
        <a class="find_a">&nbsp;&nbsp;&nbsp;说明：</a>
        <textarea style="flex: 1;" placeholder="请输入说明"></textarea>
        </div>
        </div>
        </div>
        </div>`;
    return {
      infoDom,
      feeDom,
    };
  }

  // 查看职业报考
  initLookOccupations(item, fee) {
    var infoDom = `<div class="p_line text_ient lx-row ptb10 student-occupation">
      <a class="find_a">职业技能类别：</a>
      <input type="text" class="studyMode form_input text_ient" value="${item.professionalTypes}" />
      <a class="find_a">报考专业：</a>
      <input type="text" class="studyMode form_input text_ient" value="${item.majorName}" />
      <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
      <input type="text" class="studyMode form_input text_ient" value="${item.batch}" />
      <a class="find_a">报考说明：</a>
      <input type="text" style="width:30%; max-width: 150px;" value="${item.applyExplain}" class="form_input text_ient applyExplain" placeholder="" />
    </div>`;

    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;

      return `<tr>
        <td>
        <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
          item.stage
        }" />
        </td>
        <td>
        <input class="fee-money form_input text_ient" type="number" value="${
          item.amount
        }" />
        </td>
        <td>
        <input class="fee-time form_input text_ient" type="date" value="${
          item.term
        }" />
        </td>
        <td>
        <select class="fee-flag form-control">
        <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
        <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
        </select>
        </td>
        <td>
        <select class="fee-receipt form-control" value="${item.receipt}">
        <option value="0" ${
          item.receipt === 0 ? 'selected' : ''
        }>未打印</option>
        <option value="1" ${
          item.receipt === 1 ? 'selected' : ''
        }>已打印</option>
        <option value="2" ${
          item.receipt === 2 ? 'selected' : ''
        }>退款作废</option>
        </select>
        </td>
        <td>
        <input class="fee-receipt form_input text_ient" value="" />
        </td>
        <td>
        <input class="checkPrint" type="checkbox" />
        </td>
        </tr>`;
    });
    var feeDom = `<div class="lx-section fee">
    <div class="title">
    职业缴费信息
    </div>
    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
    <table class="layui-table content-table" style="width: 100%">
    <thead>
    <tr>
    <th style="width: 10%;">期数</th>
    <th>缴费金额</th>
    <th style="width: 20%;">缴费日期</th>
    <th>是否已缴费</th>
    <th>收据状态</th>
    <th>收据号</th>
    <th><a id="printBtn">打印收据</a></th>
    </tr>
    </thead>
    <tbody>
    ${trDom.join('')}
    </tbody>
    </table>
    
    <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;">
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>总费用：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">报名费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">培训费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
        <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
        <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
        </div>
        <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;"></div>
        <div class="col lx-col-50 caption">
        <a class="find_a">&nbsp;&nbsp;&nbsp;说明：</a>
        <textarea style="flex: 1;" placeholder="请输入说明"></textarea>
        </div>
        </div>
        </div>
    </div>`;
    return {
      infoDom,
      feeDom,
    };
  }

  // 查看职称报考
  initLookTitles(item, fee) {
    var infoDom = `<div class="p_line text_ient lx-row ptb10 student-title">
      <a class="find_a">职称等级：</a>
      <input type="text" class="form_input text_ient" value="${item.professionalLevel}" />
      <a class="find_a">职称系列：</a>
      <input type="text" class="form_input text_ient" value="${item.professionalSeries}" />
      <a class="find_a">报考专业：</a>
      <input type="text" class="form_input text_ient" value="${item.majorName}" />
      <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
      <input type="text" class="form_input text_ient" value="${item.batch}" />
    </div>`;
    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;

      return `<tr>
        <td>
        <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
          item.stage
        }" />
        </td>
        <td>
        <input class="fee-money form_input text_ient" type="number" value="${
          item.amount
        }" />
        </td>
        <td>
        <input class="fee-time form_input text_ient" type="date" value="${
          item.term
        }" />
        </td>
        <td>
        <select class="fee-flag form-control">
        <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
        <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
        </select>
        </td>
        <td>
        <select class="fee-receipt form-control" value="${item.receipt}">
        <option value="0" ${
          item.receipt === 0 ? 'selected' : ''
        }>未打印</option>
        <option value="1" ${
          item.receipt === 1 ? 'selected' : ''
        }>已打印</option>
        <option value="2" ${
          item.receipt === 2 ? 'selected' : ''
        }>退款作废</option>
        </select>
        </td>
        <td>
        <input class="fee-receipt form_input text_ient" value="" />
        </td>
        <td>
        <input class="checkPrint" type="checkbox" />
        </td>
        </tr>`;
    });
    var feeDom = `<div class="lx-section fee">
    <div class="title">
    职称缴费信息
    </div>
    <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
    <table class="layui-table content-table" style="width: 100%">
    <thead>
    <tr>
    <th style="width: 10%;">期数</th>
    <th>缴费金额</th>
    <th style="width: 20%;">缴费日期</th>
    <th>是否已缴费</th>
    <th>收据状态</th>
    <th>收据号</th>
    <th><a id="printBtn">打印收据</a></th>
    </tr>
    </thead>
    <tbody>
    ${trDom.join('')}
    </tbody>
    </table>
    
    <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;">
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>总费用：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">报名费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">培训费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
        <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
        <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
        </div>
        <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;"></div>
        <div class="col lx-col-50 caption">
        <a class="find_a">&nbsp;&nbsp;&nbsp;说明：</a>
        <textarea style="flex: 1;" placeholder="请输入说明"></textarea>
        </div>
        </div>
        </div>
    </div>`;
    return {
      infoDom,
      feeDom,
    };
  }

  // 查看培训报考
  initLookTrains(item, fee) {
    var infoDom = `<div class="p_line text_ient lx-row ptb10 student-train">
        <a class="find_a">报考项目：</a>
        <input class="myTrain apply-project form_input text_ient" type="text" value="${item.applyProject}" />
        <a class="find_a">考试科目：</a>
        <input class="form_input text_ient" type="text" value="${item.examCourse}" />
        <a class="find_a">班&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
        <input class="form_input text_ient" type="text" value="${item.classs}" />
        <a class="find_a">批&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次：</a>
        <input class="form_input text_ient" type="text" value="${item.batch}" />
      </div>
      <div class="p_line text_ient lx-row ptb10">
        <a class="find_a">报考类型：</a>
        <input class="form_input text_ient" type="text" value="${item.applyAssist}" />
        <a class="find_a">开始时间：</a>
        <input type="text" class="form_input text_ient start" value="${item.startDate}" style="width: 220px" placeholder="" />
        <a class="find_a">结束时间：</a>
        <input type="text" class="form_input text_ient end" value="${item.endDate}" style="width: 220px" placeholder="" />
      </div>`;

    var allFee = '';
    var preferentialFee = '';
    var realPayFee = '';
    var trDom = fee.map((item) => {
      allFee = item.allFee;
      preferentialFee = item.preferentialFee;
      realPayFee = item.realPayFee;

      return `<tr>
            <td>
            <input class="fee-id form_input text_ient" oninput="if(value.length>1)value=value.slice(0,1)" type="number" value="${
              item.stage
            }" />
            </td>
            <td>
            <input class="fee-money form_input text_ient" type="number" value="${
              item.amount
            }" />
            </td>
            <td>
            <input class="fee-time form_input text_ient" type="date" value="${
              item.term
            }" />
            </td>
            <td>
            <select class="fee-flag form-control">
            <option value="0" ${item.flag === 0 ? 'selected' : ''}>否</option>
            <option value="1" ${item.flag === 1 ? 'selected' : ''}>是</option>
            </select>
            </td>
            <td>
            <select class="fee-receipt form-control" value="${item.receipt}">
            <option value="0" ${
              item.receipt === 0 ? 'selected' : ''
            }>未打印</option>
            <option value="1" ${
              item.receipt === 1 ? 'selected' : ''
            }>已打印</option>
            <option value="2" ${
              item.receipt === 2 ? 'selected' : ''
            }>退款作废</option>
            </select>
            </td>
            <td>
            <input class="fee-receipt form_input text_ient" value="" />
            </td>
            <td>
            <input class="checkPrint" type="checkbox" />
            </td>
            </tr>`;
    });

    var feeDom = `<div class="lx-section fee">
        <div class="title">
        培训缴费信息
        </div>
        <div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
        <table class="layui-table content-table" style="width: 100%">
        <thead>
        <tr>
        <th style="width: 10%;">期数</th>
        <th>缴费金额</th>
        <th style="width: 20%;">缴费日期</th>
        <th>是否已缴费</th>
        <th>收据状态</th>
        <th>收据号</th>
        <th><a id="printBtn">打印收据</a></th>
        </tr>
        </thead>
        <tbody>
        ${trDom.join('')}
        </tbody>
        </table>
        
        <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;">
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>总费用：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">报名费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a">培训费：</a>
        <input  type="number" class="form_input text_ient zong" value="${allFee}" placeholder="请输入总费用" maxlength="7" />
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>优惠费用：</a>
        <input  type="number" class="form_input text_ient youhui" value="${preferentialFee}" placeholder="请输入优惠费用" maxlength="7"/>
        </div>
        <div class="col lx-col-20">
        <a class="find_a"><span style="color:red">*</span>实缴费用：</a>
        <input type="number" class="form_input text_ient shijiao" value="${realPayFee}" placeholder="请输入实缴费用" maxlength="7"/>
        </div>
        <div class="p_line text_ient lx-row ptb10" style="margin: 0 auto;"></div>
        <div class="col lx-col-50 caption">
        <a class="find_a">&nbsp;&nbsp;&nbsp;说明：</a>
        <textarea style="flex: 1;" placeholder="请输入说明"></textarea>
        </div>
        </div>
        </div>
        </div>`;
    return {
      infoDom,
      feeDom,
    };
  }
  initEvent() {
    $('#printBtn').on('click', function () {
      alert('222');
    });
  }
}
